{ "name": "Door Knocker", "script": "DoorKnocker.js", "version": "1.15", "previousversions": ["1.14","1.12","1.10","1.11","1.01","1.00"], "description": "# Door Knocker v1.1\r___\rWelcome to Door Knocker. This script helps quickly open and close doors by controlling the dynamic lighting lines. If you have any questions, comments, or find a bug; please drop by the [Door Knocker forum thread](https://app.roll20.net/forum/post/7698809/script-door-knocker).\r### Using Door Knocker\rThe script will move dynamic lighting lines used as doors to the map layer and make them transparent, opening the door. It determines what is a door and a wall based on the stroke color of the polygon and will only open doors within 1 square (default 70px) of the door knocker token.\r### Basic Command Syntax\rThe script uses a standardized API command syntax. All Door Knocker commands will begin with **!knock**. This will then be followed bya space a double dash preceding a keyword and options group. This looks like this:\r**!knock --keyWord|option1|option2|...**\r### Opening and Closing Doors\rOpen and close using the **key** or **push** keyword followed by an option to tell the script whether to open doors, close doors, or toggle doors. You can also pass an optional second option to tell the script to open/close/toggle all doors within range of the knocker token, on the page, or in the campaign. These commands look like:\r**!knock --key/push|open/close/toggle|all/page/campaign**\r- **key/push:** This is the keyword that tells the script to manipulate door dynamic lighting lines. The **key** keyword operates on both locked and unlocked doors and is GM only. The **push** keyword only operates on unlocked doors.\r- **open/close/toggle/reveal/hide/togglehide/anyopen/anyclose/anytoggle:** This option tells the script to open, close, or toggle (open closed doors and close open doors) the closest door (or all doors if also using the all option described below). Reveal, hide, and togglehide cause the command to work on hidden doors instead and only work with the **key** keyword. anyopen, anyclose, and anytoggle work on all types of doors and only work with the **key** keyword.\r- **all/page/campaign:** *Optional argument* This option tells the script to operate on all doors within range, all doors on a page, or all doors in the campaign. The **page** and **campaign** keywords are GM only and do not work with the **push** keyword.\r\r### Setting up the Door Knocker\rSet the wall, door, and locked door stroke colors in the settings menu using hex color codes (e.g. #000000). You can also set these values by selecting an already created DL line. This functionality is only accessible to the GM. The command syntax for using a selected DL line looks like:\r**!knock --preset|wall/door/unlocked/hidden/farAura/closeAura|hex color**\r- **preset:** This is the keyword that tells the script to change it's settings\r- **wall/door/unlocked/farAura/closeAura:** This option tells the script to update the color setting for walls, doors, unlocked doors, and close and far door detection\r- **hex color:** *Optional argument* Passing a hex color here will set the script to consider all polygons on the Dynamic Lighting layer with a stroke of this color to be doors/walls. If this option is not passed the script will look for a selected polygon to pull a stroke color from.\r\r### Setting up your maps\rThe only map setup needed is to ensure your dynamic lighting doors are the appropriate color. This functionality is only accessible to the GM. If you are adapting a module or add-onto an already existing door color scheme you can select a door line and run the following chat command:\r**!knock --adapt|door/wall/unlocked/hidden|campaign**\r- **adapt:** This is the keyword that tells the script to update all polygons on the dynamic lighting layer with the same stroke color as the selected polygon(s) to have the script's door/wall stroke color\r- **wall/door/unlocked:** This option tells the script to update the stroke color to that of walls, doors, or unlocked doors\r- **campaign:** *Optional argument* adding this optional argument tells the script to update polygons on all pages, not just the current page.\r\r### Searching for Doors\rBy default the script will create two auras around the door knocker token when a door is with in range. Aura 1 will display the range to the closest door while aura 2 will display the range to the furthest door. You can customize what color these auras are from the settings menu on this character. You can also turn the feature can off (or back on) from there as well. It is also possible to generate these auras on other tokens by selecting them and running the following command:\r**!knock --search|on/off**\r- **search:** This is the keyword that tells the script turn on or off aura detection of nearby walls for the selected token(s)\r- **on/off:** *Optional argument* Adding this optional argument will tell the script to only turn on or off aura detection. When omitted the script will toggle aura detection instead.\r\rUsing this feature will still allow you to use your token's auras as you wish because the aura is actually created on an invisible token that is slaved to the selected token.\r### Customizing the Script\r#### Door knocker token\rThe script uses a generic key token as the door knocker token. You can customize this by changing the default token of this character.\r#### Script created abilities\rThe script also creates six abilities on this character as token actions. These can be disabled as token actions, but should not be deleted as the script will simply remake them. You can also add whatever other macros you want to this character.\r### Attributions\rThe default token image is from [https://game-icons.net/](https://game-icons.net/) under the [creative commons license](https://creativecommons.org/licenses/by/3.0/#). Thanks to Keith Curtis for finding this awesome token.", "authors": "Scott C.", "roll20userid": ["459831"], "useroptions": [], "dependencies": ["Path Math","Vector Math"], "modifies": { "state.DoorKnocker": "read,write", "character": "read,write", "graphic": "read,write", "path":"read,write", "chat":"read" }, "conflicts": [] }